package com.dreamoriole.dao.impl;

import java.util.List;

import com.dreamoriole.util.HibernateUtil;

public class FinanceObjectDaoImpl {
	void saveObject(Object obj) {
		HibernateUtil.getCurrentSession().save(obj);
	}
	
	void updateObject(Object obj) {
		HibernateUtil.getCurrentSession().update(obj);
	}
	
	void deleteObject(Object obj) {
		HibernateUtil.getCurrentSession().delete(obj);
	}
	
	Object getObject(String hql) {
		return HibernateUtil.getCurrentSession().createQuery(hql).uniqueResult();
	}
	
	List getObjects(String hql) {
		return HibernateUtil.getCurrentSession().createQuery(hql).list();
	}
}
